# -*- coding:utf-8 -*-
# @FileName  :logout.py
# @Time      :2022/12/21 16:55
# @Author    :凉柠
# @E-main    :1075090027@qq.com
from django.http import JsonResponse
from django.contrib.auth import logout

def signout(request):
    user = request.user
    if not user.is_authenticated:
        return JsonResponse({
            'result':"success",
        })
    logout(request)
    return JsonResponse({
        'result':"success",
    })
